package cnsatmsmart.automation.mmi.model.data.TSafe;

/**
 * @author SIK - PTIK, BPPT
 **/

public class Fix extends Point2D {  //based on TSafe
    /* atribut - atribut yang dimiliki oleh kelas Fix */
        private String ID;  //ID

    /* constructor - user defined ctor, no default ctor */
        // <editor-fold defaultstate="collapsed" desc="ctor">
        /*
         * @param = atribut
         */
        public Fix (String ID, double lat, double lon) {
            super(lat, lon);
            this.ID = ID;
        }
        public Fix (String ID, Point2D location) {
            this(ID, location.getLatitude(), location.getLongitude());
        }
        // </editor-fold>
    
    /* getter */
        public String getID () {
            /* mengembalikan nilai dari atribut ID */
            return (this.ID);
        }

    @Override
    public int hashCode () {
        return (this.ID.hashCode());
    }

    @Override
    public boolean equals (Object o) {
        return ((o != null) && (o instanceof Fix) && (((Fix)o).getID().equals(this.ID)));
    }

    @Override
    public String toString () {
        return (this.ID);
    }
}
